<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="/static/admin/css/bootstrap.css">
    <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
    <style type="text/css">
    html,body{margin:0;padding:0;width:100px;height:100px;}
    .uploadpic{position:relative;}
    #ImgPr{border:0;}
    .puloadpic{position:absolute;width:100px;height:100px;}
    .inputfile{position:absolute;top:0px;left:0px;z-index:100;-moz-opacity:0;opacity:0;filter: alpha(opacity=0);cursor:pointer;}
    #uploadicon{font-size:200px;overflow:hidden;display:block;width:100px;height:100px;-moz-opacity:0.0;opacity:0.0;filter: alpha(opacity=0);cursor:pointer;}
    .uploadtext{position:absolute;top:0px;left:0px;z-index:50;color:red;font-weight:bold;text-align:center;width:100px;height:100px;line-height:100px;cursor:pointer;overflow:hidden;}
    </style>
</head>
<body>
    
    <form enctype="multipart/form-data" id="PostMe" action="{:url('Upload/uploadpic')}" method="post" name="upform">
        <input type="hidden" value="100" name="width">
        <input type="hidden" value="100" name="height">
        <input type="hidden" value="head" name="backCall">
        <div class="uploadpic">
        <img id="ImgPr" src="/static/admin/images/default_head.gif" width="100" height="100" class="img-circle">
            <div class="inputfile" title="点击上传图片">
                <input type="file" name="img" id="uploadicon" value="upload"/>
            </div>
        </div>
    </form>
    <script type="text/javascript">
        $('#uploadicon').on("change",function(){
           $('#PostMe').submit();
           //alert('d');
        })
       $('#{$data.backCall}',parent.document).val("{$data.defaultImg}"); 
    </script>
</body>
</html>